package com.tbit.uqbike.client.repository;

import com.tbit.uqbike.client.ordertrace.OrderStateMachine;
import com.tbit.uqbike.client.pojo.ordertrace.EventRule;
import com.tbit.uqbike.client.service.ordertrace.OrderEventBO;

import java.util.List;

/**
 * 订单事件存储
 *
 *
 * @author <a href="mailto:chen.chaoxiong@tbit.com.cn">ChenChaoXiong</a>
 * @since 2024/7/4
 */
public interface OrderEventRepository {
    /**
     * 保存或者订单事件
     *
     * @param orderEvent 订单事件
     */
    int saveOrUpdateOrderEvent(OrderEventBO orderEvent);

    OrderEventBO queryOrderEventByTraceId(String traceId);

    List<EventRule> queryAllEventRule();

    OrderStateMachine createOrderStateMachine(String traceId);
}
